package com.xingkeduo.business.order.remote.feign;

import com.xingkeduo.dto.*;
import com.xingkeduo.utils.ResponseUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户   发型师
 */
@FeignClient(value = "business-user", fallback = AdminFeignServiceImpl.class)
public interface AdminFeignService {

    //获取发型师信息
    @RequestMapping("/craftsman/getinfo/{id}")
    ResponseUtils<CraftsmanDTO> getCraftsman(@PathVariable("id") @RequestParam(value = "id") String id);

    /**
     * 获取用户详情
     * @param id
     * @return
     */
    @GetMapping("/consumer/getinfo/{id}")
    ResponseUtils<WxMaUserInfo> getConsumerInfo(@PathVariable("id") @RequestParam(value = "id") String id);


    /**
     * 根据店铺id、服务类型、发型师id（非必填）获取发型师配置的价格信息
     * @param shopId   店铺id
     * @param serviceId  服务类型
     * @param craftsmanId    发型师id
     * @return
     */
    @GetMapping("/craftsman/service/listCraftsmanPriceByShopIdAndServiceId")
    ResponseUtils listCraftsmanPriceByShopIdAndServiceId(@RequestParam(value = "shopId")Long shopId,@RequestParam("serviceId") Long serviceId ,@RequestParam("craftsmanId") Long craftsmanId);


    /**
     * 根据条件获取
     * chi
     * @param condition
     * @return
     */
    @GetMapping("/craftsman/condition/{condition}")
    ResponseUtils<List<BaseAdminDTO>> listCraftsmanPriceByShopIdAndServiceId(@PathVariable("condition") @RequestParam(value = "condition") String condition);


    /**
     * 根据用户id，获取账号合并后的ids
     * @param urlParam
     * @return
     */
    @RequestMapping("/consumer/getid/{urlParam}")
    String queryUserListByUserId(@PathVariable("urlParam") @RequestParam(value = "urlParam") String urlParam);


    /**
     * 新增消费者统计记录
     * @return
     */
    @RequestMapping("/consumer/statistics/service")
    String insert(@RequestBody StatisticsServiceDto statisticsServiceDto);


    /**
     * 用户查询
     * @return
     */
    @RequestMapping("/consumer/list/condition/{urlParam}")
    ResponseUtils<String[]> consumer(@PathVariable("urlParam") @RequestParam(value = "urlParam") String urlParam);

    /**
     * 发型师查询
     * @return
     */
    @RequestMapping("/craftsman/list/condition/{urlParam}")
    ResponseUtils<String[]> adminCondition(@PathVariable("urlParam") @RequestParam(value = "urlParam") String urlParam);


    //获取是否是新老客户信息
    @RequestMapping("/consumer/statistics/newConsumerList")
    ResponseUtils<List<ConsumerStatisticsDTO>> getStatistics(@RequestBody  List<ConsumerStatisticsDTO>  longs);

}
